<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	template="/template/template_dialog.xhtml">
	<ui:define name="head">
		<title>#{request.getParameter('selectName')} 未检测开关列表</title>
		<link rel="stylesheet"
			href="#{request.contextPath}/resources/plugins/datatables/jquery.dataTables.min.css" />
		<style>
.dataTable th {
	white-space: nowrap !important;
}
.box-header {
	background-color: #3c8dbc;
	color: white;
	font-family: "SimHei";
}

</style>
	</ui:define>
	<ui:define name="content">
		<div class="row">
			<div class="col-xs-12">				
				<div id="d1" class="box">
					<div class="box-body">
					站点名称：<input type="text" id="subname"/>	
					时间：<input type="text" id="datetime"/>			  			
					<table id="switch" class="table table-bordered table-hover">
							
					</table>
					</div>
			
				</div>
			</div>
			
		</div>
		<h:inputHidden id="lineName"
			value="#{request.getParameter('selectName')}"></h:inputHidden>
	</ui:define>

	<ui:define name="contentend">	
	    <script src="#{request.contextPath}/resources/js/mycharts/charts.js"></script>
	    <script src="#{request.contextPath}/resources/plugins/echarts/echarts.js"></script>
		<script src="#{request.contextPath}/resources/plugins/datatables/jquery.dataTables.min.js"></script>
		<script src="#{request.contextPath}/resources/plugins/datatables/dataTables.bootstrap.min.js"></script>
		
		<script src="#{request.contextPath}/resources/js/array-util.js"></script>		
		<script>				  
		  var tb = $('#switch').DataTable({
			     "language": {
		        	"url": "#{request.contextPath}/resources/plugins/datatables/Chinese.json"
		           },
			      "paging": true,//禁止表格分页
			      "lengthChange": false,
			      "searching": true,
			      "ordering": false,
			      "info": true,
			      "autoWidth": true,	       
			       columns:[
			        {"title":"开关名称"}, 
			        {"title":"站点名称"}, 
			        {"title":"最后记录时间"}, 
			        ]
			        
		   });
		  
		  var option={
				  subname:"",
				  datetime;""
		  }
         $(function() {
			  $.getJSON("/rest/pms/getContents,function(result){				   				    		     		 
		    		
	    		  tb.clear().rows.add(result).draw();	    		 
	    });
        });
	  	    	
		</script>
	</ui:define>
</ui:composition>